package com.qibao.springboot.service.impl;

import com.qibao.springboot.service.IHelloService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import redis.clients.jedis.Jedis;
import redis.clients.jedis.JedisPool;

/**
 * @Description:
 * @Auther: giozola 2018/11/15 16 57
 * @Version 1.0.1
 */
@Service
public class HelloService implements IHelloService {
    @Autowired
    private JedisPool jedisPool;

    @Override
    public String sayHello(String val) {
        Jedis jedis = jedisPool.getResource();
        jedis.set("name", val);
        String name = jedis.get("name_zhangsan");
        return name;
    }

}
